﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication2
{
    class Trapezoid : CalculateArea
    {
        private double topBottom;
        private double belowBottom;
        private double height;

        public override double Area()
        {
            return (topBottom + belowBottom) * height / 2;
        }

        public void SetTopBottom(double topBottom)
        {
            this.topBottom = topBottom;
        }
        public void SetBelowBottom(double belowBottom)
        {
            this.belowBottom = belowBottom;
        }

        public void SetHeight(double height)
        {
            this.height = height;
        }
        public double GetTopBottom()
        {
            return topBottom;
        }

        public double GetBelowBottom()
        {
            return belowBottom;
        }

        public double GetHeight()
        {
            return height;
        }

    }
}
